#ifndef SHADER_H
#define SHADER_H

#include <glad/glad.h>  // include glad to get the proper includes
#include <glm/glm.hpp>
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>

class Shader { 
    public:
    //程序ID
    unsigned int ID;

    //构造器读取并构建着色器
    Shader(const char *vertexPath, const char *fragmentPath);
    //使用/激活程序
    void use();
    // utility uniform functions
    void setBool(const std::string &name, bool value) const;
    void setInt(const std::string &name, int value) const;
    void setFloat(const std::string &name, float value) const;
    void setVec4(const std::string &name, const glm::vec4 & value)const;
    void setMat4(const std::string &name, const glm::mat4 &mat) const;
};

#endif // !SHADER_H
